package moc.egg;
import moc.compiler.*;
import moc.tds.*;
import moc.type.*;
import moc.gc.*;
import java.util.*;
import mg.egg.eggc.runtime.libjava.lex.*;
import mg.egg.eggc.runtime.libjava.*;
import mg.egg.eggc.runtime.libjava.messages.*;
import mg.egg.eggc.runtime.libjava.problem.IProblem;
import java.util.Vector;
public class S_REFS_MOC {
LEX_MOC scanner;
  S_REFS_MOC() {
    }
  S_REFS_MOC(LEX_MOC scanner, boolean eval) {
    this.scanner = scanner;
    this.att_eval = eval;
    this.att_scanner = scanner;
    }
int [] sync= new int[0];
  DTYPE att_stype;
  boolean att_eval;
  DTYPE att_htype;
  LEX_MOC att_scanner;
  private void regle11() throws Exception {

    //declaration
    //appel
if  (att_eval)      action_type_11();
  }
  private void regle12() throws Exception {

    //declaration
    T_MOC x_2 = new T_MOC(scanner ) ;
    S_REFS_MOC x_4 = new S_REFS_MOC(scanner,att_eval) ;
    //appel
    x_2.analyser(LEX_MOC.token_mult);
if  (att_eval)      action_htype_12(x_4);
    x_4.analyser() ;
if  (att_eval)      action_type_12(x_4);
  }
  private void regle16() throws Exception {

    //declaration
    T_MOC x_2 = new T_MOC(scanner ) ;
    T_MOC x_3 = new T_MOC(scanner ) ;
    T_MOC x_4 = new T_MOC(scanner ) ;
    S_REFS_MOC x_6 = new S_REFS_MOC(scanner,att_eval) ;
    //appel
    x_2.analyser(LEX_MOC.token_cro);
    x_3.analyser(LEX_MOC.token_entier);
    x_4.analyser(LEX_MOC.token_crf);
if  (att_eval)      action_htype_16(x_3, x_6);
    x_6.analyser() ;
if  (att_eval)      action_type_16(x_3, x_6);
  }
private void action_type_16(T_MOC x_3, S_REFS_MOC x_6) throws Exception {
try {
// instructions
this.att_stype=x_6.att_stype;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#type","REFS -> cro entier crf #htype REFS1 #type ;"});
}
  }
private void action_htype_16(T_MOC x_3, S_REFS_MOC x_6) throws Exception {
try {
// instructions
x_6.att_htype= new ARRAYTYPE(x_3.att_txt, this.att_htype);
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#htype","REFS -> cro entier crf #htype REFS1 #type ;"});
}
  }
private void action_type_12(S_REFS_MOC x_4) throws Exception {
try {
// instructions
this.att_stype=x_4.att_stype;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#type","REFS -> mult #htype REFS1 #type ;"});
}
  }
private void action_htype_12(S_REFS_MOC x_4) throws Exception {
try {
// instructions
x_4.att_htype= new POINTEURTYPE(this.att_htype);
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#htype","REFS -> mult #htype REFS1 #type ;"});
}
  }
private void action_type_11() throws Exception {
try {
// instructions
this.att_stype=this.att_htype;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#type","REFS -> #type ;"});
}
  }
  public void analyser () throws Exception {
    scanner.lit ( 1 ) ;
    switch ( scanner.fenetre[0].code ) {
      case LEX_MOC.token_ident : // 3890
        regle11 () ;
      break ;
      case LEX_MOC.token_parf : // 3853
        regle11 () ;
      break ;
      case LEX_MOC.token_paro : // 3852
        regle11 () ;
      break ;
      case LEX_MOC.token_mult : // 3878
        regle12 () ;
      break ;
      case LEX_MOC.token_cro : // 3885
        regle16 () ;
      break ;
      default :
               scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMOCMessages.id_MOC_unexpected_token,MOCMessages.MOC_unexpected_token,new String[]{scanner.fenetre[0].getNom()});
    }
  }
  }
